enum PermissionStatus {
  notDetermined(0),
  restricted(1),
  denied(2),
  authorized(3),
  unknown(-1);

  const PermissionStatus(this.number);

  final int number;

  static PermissionStatus getStatus(int number) =>
      PermissionStatus.values.firstWhere(
        (activity) => activity.number == number,
        orElse: () => PermissionStatus.unknown,
      );
}
